package com.xzx.refactoring;

/**
 * @author xinzhixuan
 * @version V1.0
 * @date 2017/8/28 0:22
 */
public class NewReleasePrice extends Price {

    @Override
    int getPriceCode() {
        return Movie.NEW_RELEASE;
    }

    @Override
    double getCharge(int daysRented) {
        return daysRented * 3;
    }

    @Override
    int getFrequentRentalPoints(int daysRented) {
        return daysRented > 1 ? 2 : 1;
    }
}
